<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no">
    <title>付钱拉H5支付示例</title>
    <script src="https://lib.fuqian.la/h5jssdk.4.0.js"></script>
    <style>
        button { width: 100%; height: 35px; border-radius: 5px; font-size: 14px; color: #fff; background-color: #000; border: 0; margin-bottom: 30px;}
    </style>
</head>
<body>
    <p>备注：请把该文件放到静态服务器里访问。</p>
    <button id="paylist">支付列表</button>
    <button id="wx">微信支付</button>
    <button id="alipay">支付宝支付</button>
    <script>
        var notifyUrl = 'http://10.106.65.132:8091/asyncnotify';

        document.querySelector('#paylist').addEventListener('click', function(){
            FUQIANLA.init({
                app_id: '3hmd5BArSIk87ELxUBXWFA',
                order_no: Date.now(),
                amount: '1',
                channel: '',
                subject: 'h5测试数据',
                notify_url: notifyUrl,
                extra:{
                    jd_pay_wap: {
                        return_url: 'http://fuqian.la'
                    },
                    yb_pay_wap: {
                        productcatalog: 30,
                        identityid: '132xxd12390765591'
                    }
                }
            });
        });

        document.querySelector('#wx').addEventListener('click', e => {
            FUQIANLA.init({
                app_id: '3hmd5BArSIk87ELxUBXWFA',
                order_no: Date.now(),
                amount: '1',
                channel: 'wx_pay_pub',
                subject: 'h5测  试   数   据 aaa',
                notify_url: notifyUrl,
                extra: {
                    openid: 'odKIlw0xYWR0mqXZ4VHER611W990',
                    cb: data => {
                        console.log(data);
                    }
                }
            });
        });

        document.querySelector('#alipay').addEventListener('click', e => {
            FUQIANLA.init({
                app_id: '3hmd5BArSIk87ELxUBXWFA',
                order_no: Date.now(),
                amount: '1',
                channel: 'ali_pay_wap',
                subject: 'h5测试数据',
                notify_url: notifyUrl
            });
        });
    </script>
</body>
</html>